Eclipse JDT
Pre-release 3.0

org.eclipse.jdt.core.search
Class SearchRequestor

java.lang.Object
  extended byorg.eclipse.jdt.core.search.SearchRequestor

public abstract class SearchRequestor
extends Object

A SearchRequestor collects search results from a search query to a SearchEngine. Clients must implement this interface and pass an instance to the search(...) methods. When a search starts, the aboutToStart() method is called, then 0 or more call to accept(...) are done, finally the done() method is called.

Results provided to this collector may be accurate - in this case they have an EXACT_MATCH accuracy - or they might be potential matches only - they have a POTENTIAL_MATCH accuracy. This last case can occur when a problem prevented the SearchEngine from resolving the match.

The order of the results is unspecified. Clients must not rely on this order to display results, but they should sort these results (for example, in syntactical order).

The SearchRequestor is also used to provide a progress monitor to the SearchEngine.

Clients may implement this interface.

Since:
3.0
See Also:
SearchEngine.search(org.eclipse.core.resources.IWorkspace, java.lang.String, int, int, org.eclipse.jdt.core.search.IJavaSearchScope, org.eclipse.jdt.core.search.IJavaSearchResultCollector)

Field Summary
static int D_LOCATION
          expected detail level
static int D_NAME
           
static int D_PATH
           
static int D_POSITION
           
 
Constructor Summary
SearchRequestor()
           
 
Method Summary
abstract  boolean acceptSearchMatch(SearchMatch match)
           
abstract  void beginReporting()
          Notification sent before starting the search action.
abstract  void endReporting()
          Notification sent after having completed the search action.
abstract  void enterParticipant(SearchParticipant participant)
          Intermediate notification sent when a given participant is starting to contribute.
abstract  void exitParticipant(SearchParticipant participant)
          Intermediate notification sent when a given participant is finished contributing.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

D_LOCATION

public static final int D_LOCATION
expected detail level

See Also:
Constant Field Values

D_NAME

public static final int D_NAME
See Also:
Constant Field Values

D_PATH

public static final int D_PATH
See Also:
Constant Field Values

D_POSITION

public static final int D_POSITION
See Also:
Constant Field Values
Constructor Detail

SearchRequestor

public SearchRequestor()
Method Detail

acceptSearchMatch

public abstract boolean acceptSearchMatch(SearchMatch match)
                                   throws CoreException
Throws:
CoreException

beginReporting

public abstract void beginReporting()
Notification sent before starting the search action. Typically, this would tell a search requestor to clear previously recorded search results.


endReporting

public abstract void endReporting()
Notification sent after having completed the search action. Typically, this would tell a search requestor collector that no more results should be expected in this iteration.


enterParticipant

public abstract void enterParticipant(SearchParticipant participant)
Intermediate notification sent when a given participant is starting to contribute.


exitParticipant

public abstract void exitParticipant(SearchParticipant participant)
Intermediate notification sent when a given participant is finished contributing.


Eclipse JDT
Pre-release 3.0

Copyright (c) IBM Corp. and others 2000, 2003. All Rights Reserved.